// Copyright 2020 The XLS Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef XLS_DSLX_CPP_SCANNER_KEYWORDS_INC_
#define XLS_DSLX_CPP_SCANNER_KEYWORDS_INC_

// See also `XLS_DSLX_TYPE_KEYWORDS` below and `xls/dslx/ast_builtin_types.inc`
#define XLS_DSLX_KEYWORDS(X)               \
  X(kAs, AS, "as")                         \
  X(kConst, CONST, "const")                \
  X(kElse, ELSE, "else")                   \
  X(kEnum, ENUM, "enum")                   \
  X(kFalse, FALSE, "false")                \
  X(kFn, FN, "fn")                         \
  X(kFor, FOR, "for")                      \
  X(kIf, IF, "if")                         \
  X(kImpl, IMPL, "impl")                   \
  X(kImport, IMPORT, "import")             \
  X(kIn, IN, "in")                         \
  X(kOut, OUT, "out")                      \
  X(kLet, LET, "let")                      \
  X(kMatch, MATCH, "match")                \
  X(kPub, PUB, "pub")                      \
  X(kProc, PROC, "proc")                   \
  X(kSelf, SELF, "self")                   \
  X(kSpawn, SPAWN, "spawn")                \
  X(kStruct, STRUCT, "struct")             \
  X(kTrait, TRAIT, "trait")                \
  X(kTrue, TRUE, "true")                   \
  X(kType, TYPE, "type")                   \
  X(kUnrollFor, UNROLL_FOR, "unroll_for!") \
  X(kUse, USE, "use")                      \
  X(kMut, MUT, "mut")                      \
  /* builtin types */                      \
  X(kBits, BITS, "bits")                   \
  X(kToken, TOKEN, "token")                \
  X(kUN, UN, "uN")                         \
  X(kSN, SN, "sN")                         \
  X(kXN, XN, "xN")                         \
  X(kBool, BOOL, "bool")                   \
  X(kChan, CHAN, "chan")                   \
  X(kSelfType, SELF_TYPE, "Self")          \
  /* unsigned */                           \
  X(kU1, U1, "u1")                         \
  X(kU2, U2, "u2")                         \
  X(kU3, U3, "u3")                         \
  X(kU4, U4, "u4")                         \
  X(kU5, U5, "u5")                         \
  X(kU6, U6, "u6")                         \
  X(kU7, U7, "u7")                         \
  X(kU8, U8, "u8")                         \
  X(kU9, U9, "u9")                         \
  X(kU10, U10, "u10")                      \
  X(kU11, U11, "u11")                      \
  X(kU12, U12, "u12")                      \
  X(kU13, U13, "u13")                      \
  X(kU14, U14, "u14")                      \
  X(kU15, U15, "u15")                      \
  X(kU16, U16, "u16")                      \
  X(kU17, U17, "u17")                      \
  X(kU18, U18, "u18")                      \
  X(kU19, U19, "u19")                      \
  X(kU20, U20, "u20")                      \
  X(kU21, U21, "u21")                      \
  X(kU22, U22, "u22")                      \
  X(kU23, U23, "u23")                      \
  X(kU24, U24, "u24")                      \
  X(kU25, U25, "u25")                      \
  X(kU26, U26, "u26")                      \
  X(kU27, U27, "u27")                      \
  X(kU28, U28, "u28")                      \
  X(kU29, U29, "u29")                      \
  X(kU30, U30, "u30")                      \
  X(kU31, U31, "u31")                      \
  X(kU32, U32, "u32")                      \
  X(kU33, U33, "u33")                      \
  X(kU34, U34, "u34")                      \
  X(kU35, U35, "u35")                      \
  X(kU36, U36, "u36")                      \
  X(kU37, U37, "u37")                      \
  X(kU38, U38, "u38")                      \
  X(kU39, U39, "u39")                      \
  X(kU40, U40, "u40")                      \
  X(kU41, U41, "u41")                      \
  X(kU42, U42, "u42")                      \
  X(kU43, U43, "u43")                      \
  X(kU44, U44, "u44")                      \
  X(kU45, U45, "u45")                      \
  X(kU46, U46, "u46")                      \
  X(kU47, U47, "u47")                      \
  X(kU48, U48, "u48")                      \
  X(kU49, U49, "u49")                      \
  X(kU50, U50, "u50")                      \
  X(kU51, U51, "u51")                      \
  X(kU52, U52, "u52")                      \
  X(kU53, U53, "u53")                      \
  X(kU54, U54, "u54")                      \
  X(kU55, U55, "u55")                      \
  X(kU56, U56, "u56")                      \
  X(kU57, U57, "u57")                      \
  X(kU58, U58, "u58")                      \
  X(kU59, U59, "u59")                      \
  X(kU60, U60, "u60")                      \
  X(kU61, U61, "u61")                      \
  X(kU62, U62, "u62")                      \
  X(kU63, U63, "u63")                      \
  X(kU64, U64, "u64")                      \
  /* signed */                             \
  X(kS1, S1, "s1")                         \
  X(kS2, S2, "s2")                         \
  X(kS3, S3, "s3")                         \
  X(kS4, S4, "s4")                         \
  X(kS5, S5, "s5")                         \
  X(kS6, S6, "s6")                         \
  X(kS7, S7, "s7")                         \
  X(kS8, S8, "s8")                         \
  X(kS9, S9, "s9")                         \
  X(kS10, S10, "s10")                      \
  X(kS11, S11, "s11")                      \
  X(kS12, S12, "s12")                      \
  X(kS13, S13, "s13")                      \
  X(kS14, S14, "s14")                      \
  X(kS15, S15, "s15")                      \
  X(kS16, S16, "s16")                      \
  X(kS17, S17, "s17")                      \
  X(kS18, S18, "s18")                      \
  X(kS19, S19, "s19")                      \
  X(kS20, S20, "s20")                      \
  X(kS21, S21, "s21")                      \
  X(kS22, S22, "s22")                      \
  X(kS23, S23, "s23")                      \
  X(kS24, S24, "s24")                      \
  X(kS25, S25, "s25")                      \
  X(kS26, S26, "s26")                      \
  X(kS27, S27, "s27")                      \
  X(kS28, S28, "s28")                      \
  X(kS29, S29, "s29")                      \
  X(kS30, S30, "s30")                      \
  X(kS31, S31, "s31")                      \
  X(kS32, S32, "s32")                      \
  X(kS33, S33, "s33")                      \
  X(kS34, S34, "s34")                      \
  X(kS35, S35, "s35")                      \
  X(kS36, S36, "s36")                      \
  X(kS37, S37, "s37")                      \
  X(kS38, S38, "s38")                      \
  X(kS39, S39, "s39")                      \
  X(kS40, S40, "s40")                      \
  X(kS41, S41, "s41")                      \
  X(kS42, S42, "s42")                      \
  X(kS43, S43, "s43")                      \
  X(kS44, S44, "s44")                      \
  X(kS45, S45, "s45")                      \
  X(kS46, S46, "s46")                      \
  X(kS47, S47, "s47")                      \
  X(kS48, S48, "s48")                      \
  X(kS49, S49, "s49")                      \
  X(kS50, S50, "s50")                      \
  X(kS51, S51, "s51")                      \
  X(kS52, S52, "s52")                      \
  X(kS53, S53, "s53")                      \
  X(kS54, S54, "s54")                      \
  X(kS55, S55, "s55")                      \
  X(kS56, S56, "s56")                      \
  X(kS57, S57, "s57")                      \
  X(kS58, S58, "s58")                      \
  X(kS59, S59, "s59")                      \
  X(kS60, S60, "s60")                      \
  X(kS61, S61, "s61")                      \
  X(kS62, S62, "s62")                      \
  X(kS63, S63, "s63")                      \
  X(kS64, S64, "s64")                      \
  /* done */

#define XLS_DSLX_SIZED_TYPE_KEYWORDS(X) \
  /* unsigned */                        \
  X(kU1, U1, "u1")                      \
  X(kU2, U2, "u2")                      \
  X(kU3, U3, "u3")                      \
  X(kU4, U4, "u4")                      \
  X(kU5, U5, "u5")                      \
  X(kU6, U6, "u6")                      \
  X(kU7, U7, "u7")                      \
  X(kU8, U8, "u8")                      \
  X(kU9, U9, "u9")                      \
  X(kU10, U10, "u10")                   \
  X(kU11, U11, "u11")                   \
  X(kU12, U12, "u12")                   \
  X(kU13, U13, "u13")                   \
  X(kU14, U14, "u14")                   \
  X(kU15, U15, "u15")                   \
  X(kU16, U16, "u16")                   \
  X(kU17, U17, "u17")                   \
  X(kU18, U18, "u18")                   \
  X(kU19, U19, "u19")                   \
  X(kU20, U20, "u20")                   \
  X(kU21, U21, "u21")                   \
  X(kU22, U22, "u22")                   \
  X(kU23, U23, "u23")                   \
  X(kU24, U24, "u24")                   \
  X(kU25, U25, "u25")                   \
  X(kU26, U26, "u26")                   \
  X(kU27, U27, "u27")                   \
  X(kU28, U28, "u28")                   \
  X(kU29, U29, "u29")                   \
  X(kU30, U30, "u30")                   \
  X(kU31, U31, "u31")                   \
  X(kU32, U32, "u32")                   \
  X(kU33, U33, "u33")                   \
  X(kU34, U34, "u34")                   \
  X(kU35, U35, "u35")                   \
  X(kU36, U36, "u36")                   \
  X(kU37, U37, "u37")                   \
  X(kU38, U38, "u38")                   \
  X(kU39, U39, "u39")                   \
  X(kU40, U40, "u40")                   \
  X(kU41, U41, "u41")                   \
  X(kU42, U42, "u42")                   \
  X(kU43, U43, "u43")                   \
  X(kU44, U44, "u44")                   \
  X(kU45, U45, "u45")                   \
  X(kU46, U46, "u46")                   \
  X(kU47, U47, "u47")                   \
  X(kU48, U48, "u48")                   \
  X(kU49, U49, "u49")                   \
  X(kU50, U50, "u50")                   \
  X(kU51, U51, "u51")                   \
  X(kU52, U52, "u52")                   \
  X(kU53, U53, "u53")                   \
  X(kU54, U54, "u54")                   \
  X(kU55, U55, "u55")                   \
  X(kU56, U56, "u56")                   \
  X(kU57, U57, "u57")                   \
  X(kU58, U58, "u58")                   \
  X(kU59, U59, "u59")                   \
  X(kU60, U60, "u60")                   \
  X(kU61, U61, "u61")                   \
  X(kU62, U62, "u62")                   \
  X(kU63, U63, "u63")                   \
  X(kU64, U64, "u64")                   \
  /* signed */                          \
  X(kS1, S1, "s1")                      \
  X(kS2, S2, "s2")                      \
  X(kS3, S3, "s3")                      \
  X(kS4, S4, "s4")                      \
  X(kS5, S5, "s5")                      \
  X(kS6, S6, "s6")                      \
  X(kS7, S7, "s7")                      \
  X(kS8, S8, "s8")                      \
  X(kS9, S9, "s9")                      \
  X(kS10, S10, "s10")                   \
  X(kS11, S11, "s11")                   \
  X(kS12, S12, "s12")                   \
  X(kS13, S13, "s13")                   \
  X(kS14, S14, "s14")                   \
  X(kS15, S15, "s15")                   \
  X(kS16, S16, "s16")                   \
  X(kS17, S17, "s17")                   \
  X(kS18, S18, "s18")                   \
  X(kS19, S19, "s19")                   \
  X(kS20, S20, "s20")                   \
  X(kS21, S21, "s21")                   \
  X(kS22, S22, "s22")                   \
  X(kS23, S23, "s23")                   \
  X(kS24, S24, "s24")                   \
  X(kS25, S25, "s25")                   \
  X(kS26, S26, "s26")                   \
  X(kS27, S27, "s27")                   \
  X(kS28, S28, "s28")                   \
  X(kS29, S29, "s29")                   \
  X(kS30, S30, "s30")                   \
  X(kS31, S31, "s31")                   \
  X(kS32, S32, "s32")                   \
  X(kS33, S33, "s33")                   \
  X(kS34, S34, "s34")                   \
  X(kS35, S35, "s35")                   \
  X(kS36, S36, "s36")                   \
  X(kS37, S37, "s37")                   \
  X(kS38, S38, "s38")                   \
  X(kS39, S39, "s39")                   \
  X(kS40, S40, "s40")                   \
  X(kS41, S41, "s41")                   \
  X(kS42, S42, "s42")                   \
  X(kS43, S43, "s43")                   \
  X(kS44, S44, "s44")                   \
  X(kS45, S45, "s45")                   \
  X(kS46, S46, "s46")                   \
  X(kS47, S47, "s47")                   \
  X(kS48, S48, "s48")                   \
  X(kS49, S49, "s49")                   \
  X(kS50, S50, "s50")                   \
  X(kS51, S51, "s51")                   \
  X(kS52, S52, "s52")                   \
  X(kS53, S53, "s53")                   \
  X(kS54, S54, "s54")                   \
  X(kS55, S55, "s55")                   \
  X(kS56, S56, "s56")                   \
  X(kS57, S57, "s57")                   \
  X(kS58, S58, "s58")                   \
  X(kS59, S59, "s59")                   \
  X(kS60, S60, "s60")                   \
  X(kS61, S61, "s61")                   \
  X(kS62, S62, "s62")                   \
  X(kS63, S63, "s63")                   \
  X(kS64, S64, "s64")                   \
  /* done */

#define XLS_DSLX_TYPE_KEYWORDS(X) \
  /* builtin types */             \
  X(kBits, BITS, "bits")          \
  X(kToken, TOKEN, "token")       \
  X(kUN, UN, "uN")                \
  X(kSN, SN, "sN")                \
  X(kXN, XN, "xN")                \
  X(kBool, BOOL, "bool")          \
  X(kChan, CHAN, "chan")          \
  X(kSelfType, SELF_TYPE, "Self") \
  X(kType, TYPE, "type")          \
  XLS_DSLX_SIZED_TYPE_KEYWORDS(X) \
  /* done */

#endif  // XLS_DSLX_CPP_SCANNER_KEYWORDS_INC_
